import tornado.web
import tornado.websocket
import handler

def make_app():
    return tornado.web.Application([
        ("/", handler.GameClientHandler),
        ("/pvp",handler.PvpHandler),
        ('/sendPos',handler.BoardAdapterHandler),
        ('/exitChess',handler.ExitChessHandler),
        ('/backChess',handler.BackChessHandler)
    ])

if __name__ == "__main__":
    app = make_app()
    app.listen(8880)
    print("WebSocket 服务器 已开启")
    tornado.ioloop.IOLoop.current().start()